#include<stdio.h>
int fobo_nq(int x)
{
	int a = 1, b = 1, c = 0;
	while (x > 2)
	{
		c = a + b;
		a = b;
		b = c;
		x--;
	}
	return c;
}
int main()
{
	int n = 0;
	int re = 0;
	scanf_s("%d\0", &n);
	re = fobo_nq(n);
		printf("%d", re);
	return 0;
}
